package com.jin.crud.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jin.crud.bean.SysUserRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户和角色关联表 Mapper 接口
 * </p>
 *
 * @author yuxuejin
 * @since 2021-11-16
 */
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {

    int deleteUserRoleByUserId(String userId);

    /**
     * 批量新增用户角色信息
     *
     * @param list 用户角色列表
     * @return 结果
     */
    int batchUserRole(List<SysUserRole> list);

    int deleteUserRoleInfo(SysUserRole userRole);

    int deleteUserRoleInfos(@Param("roleId") String roleId, @Param("userIds") String[] userIds);
}
